Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

199
Vistas
Global "window" object

The global window object stores properties specific to the environment (for example, window.innerHeight).

But if we print window to the console, we will see the properties highlighted in a different color.

enter image description here

These include Array, Object, and so on, although i thought they are internal objects.

I have a few questions:

  1. What are these "implicit" properties?
  2. Where do JS boundaries end and environment begin?
  3. Can I refer to Array in Node.js, for example?

Thank you.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

In the early days of Javascript, there was one master global symbol and everything that was available in the global scope whether it was part of the language itself or part of the browser environment was a property of that master global.

In the browser, that master global is the window object. Thus, you see many things on the window object that are available globally like the Array constructor.

I would guess that this is a side effect of that fact that Javascript was first designed to run in a browser and was not initially a completely stand-alone language with a stand-alone specification.

More recent revisions to the language specification are not adding some new things to the window object any more. For example, when you declare an ES6 class such as:

class Foo {
    constructor(greeting) {
        this.greeting = greeting;
    }
}

You will not find Foo on the window object even though it may be globally available in the browser.

As others have said, the color difference in the debug output has to do with whether the symbols are enumerable or not which is a technical distinction on whether the property shows up in something like Object.keys() or a for/in loop. The property is still there and is accessible either way.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda